package FirstExam10tasks;

public class Task7 {

	public static void main(String[] args) 
	{
		int[] arr = {10,30,30,50,40,20};
	    //int[] arr = {10,20,30};
		//int[] arr = {10,7,70};
		//int[] arr = {14,13,12,11};
		
		if(arr[0]<arr[1])
		{
			heckHill(arr);
		}
		else
		{
			hollow(arr);
		}
		
	}

	private static void heckHill(int[] arr)
	{
		int count = 0;
		
		for(int i = 0; i < arr.length - 1; i++)
		{
			if(arr[i] <= arr[i+1])
			{
				count++;
			}
		}
		System.out.println("(hill) " + count);
	}
	
	private static void hollow( int[] arr) 
	{
		int count = 0;
		
		for(int i = 0; i < arr.length - 1; i++)
		{
			if(arr[i] >= arr[i+1])
			{
				count++;
			}
		}
		System.out.println("(hollow) " + count);
	}
	
}
